include lib/fp4.4th
include lib/erf.4th

fclear 100 set-precision

." Calculated values vs. Reference values (ERF)" cr
s" 0e" s>float erf f. ." 0e" cr
s" 0.1e" s>float erf f. ." 1.124629160182848922032750717439683832217e-1" cr
s" 0.2e" s>float erf f. ." 2.227025892104784541401390068001438163883e-1" cr
s" 0.3e" s>float erf f. ." 3.286267594591274276389140478667565511699e-1" cr
s" 0.4e" s>float erf f. ." 4.283923550466684551036038453201724441219e-1" cr
s" 0.5e" s>float erf f. ." 5.204998778130465376827466538919645287365e-1" cr
s" 1.0e" s>float erf f. ." 8.427007929497148693412206350826092592961e-1" cr
s" 1.5e" s>float erf f. ." 9.661051464753107270669762616459478586814e-1" cr
s" 2.0e" s>float erf f. ." 9.953222650189527341620692563672529286109e-1" cr
s" 2.5e" s>float erf f. ." 9.995930479825550410604357842600250872797e-1" cr
s" 3.0e" s>float erf f. ." 9.999779095030014145586272238704176796202e-1" cr
s" 3.5e" s>float erf f. ." 9.999992569016276585872544763162439043643e-1" cr
s" 4.0e" s>float erf f. ." 9.999999845827420997199811478403265131160e-1" cr cr

." Calculated values vs. Reference values (ERFC)" cr
s" 4.00e" s>float erfc fe. ." 1.541725790028001885215967348688404857215e-8" cr
s" 4.50e" s>float erfc fe. ." 1.966160441542887476279160367664332660578e-10" cr
s" 5.00e" s>float erfc fe. ." 1.537459794428034850188343485383378890118e-12" cr
s" 5.50e" s>float erfc fe. ." 7.357847917974398063068362398570090208223e-15" cr
s" 6.00e" s>float erfc fe. ." 2.151973671249891311659335039918738463048e-17" cr
s" 6.50e" s>float erfc fe. ." 3.842148327120647469875804543768776621449e-20" cr
s" 7.00e" s>float erfc fe. ." 4.183825607779414398614010223899932250030e-23" cr
s" 7.50e" s>float erfc fe. ." 2.776649386030569100663966209322412586740e-26" cr
s" 8.00e" s>float erfc fe. ." 1.122429717298292707996788844317027909343e-29" cr
s" 8.50e" s>float erfc fe. ." 2.762324071333771446134502930057782220140e-33" cr
s" 9.00e" s>float erfc fe. ." 4.137031746513810238053903467362524595710e-37" cr
s" 9.50e" s>float erfc fe. ." 3.769214485654879941677087321047321969621e-41" cr
s" 1.00e1" s>float erfc fe. ." 2.088487583762544757000786294957788611561e-45" cr
s" 1.05e1" s>float erfc fe. ." 7.035928090177522686735314989983875191751e-50" cr
s" 1.10e1" s>float erfc fe. ." 1.440866137943694680339809702856082753964e-54" cr
s" 1.15e1" s>float erfc fe. ." 1.793309643576782058109116063975786076405e-59" cr
s" 1.20e1" s>float erfc fe. ." 1.356261169205904212780306156590417572667e-64" cr
s" 1.25e1" s>float erfc fe. ." 6.231942781979911006139549129089687366380e-70" cr
s" 1.30e1" s>float erfc fe. ." 1.739557315466724521804198548243026985089e-75" cr
s" 1.35e1" s>float erfc fe. ." 2.949433113257988264759187435938438926110e-81" cr
s" 1.40e1" s>float erfc fe. ." 3.037229847750311665115172806783328447912e-87" cr
s" 1.45e1" s>float erfc fe. ." 1.899395941979503049574200023929227908760e-93" cr
s" 1.50e1" s>float erfc fe. ." 7.212994172451206666565066558692927109934e-100" cr
s" 1.55e1" s>float erfc fe. ." 1.663201640048872334149102741177324070423e-106" cr
s" 1.60e1" s>float erfc fe. ." 2.328485751571530693364872854573442597534e-113" cr
s" 1.65e1" s>float erfc fe. ." 1.979130575553267972057334325050809148358e-120" cr
s" 1.70e1" s>float erfc fe. ." 1.021228015094260881145599235077652994402e-127" cr
s" 1.75e1" s>float erfc fe. ." 3.198863812343480988193469195296936871692e-135" cr
s" 1.80e1" s>float erfc fe. ." 6.082369231816399307668466715702274949588e-143" cr
s" 1.85e1" s>float erfc fe. ." 7.019961574985679324600020297239088904740e-151" cr
s" 1.90e1" s>float erfc fe. ." 4.917722839256475446413297625239608170931e-159" cr
s" 1.95e1" s>float erfc fe. ." 2.090954147922729460496243175316188288743e-167" cr
s" 2.00e1" s>float erfc fe. ." 5.395865611607900928934999167905345604088e-176" cr
s" 2.05e1" s>float erfc fe. ." 8.450842369572458394324668950605102484119e-185" cr
s" 2.10e1" s>float erfc fe. ." 8.032453871022455669021356947138268888968e-194" cr
s" 2.15e1" s>float erfc fe. ." 4.633336539658445649129685587506432913376e-203" cr
s" 2.20e1" s>float erfc fe. ." 1.621905860933472513052034647026123265178e-212" cr
s" 2.25e1" s>float erfc fe. ." 3.445348860464601762032717331402956086707e-222" cr
s" 2.30e1" s>float erfc fe. ." 4.441265948088057244074884428946738565069e-232" cr
s" 2.35e1" s>float erfc fe. ." 3.474059495649971502741911545224997354591e-242" cr
s" 2.40e1" s>float erfc fe. ." 1.648982583151933514218512437543746903943e-252" cr
s" 2.45e1" s>float erfc fe. ." 4.749361264067378997552878283177710144873e-263" cr
s" 2.50e1" s>float erfc fe. ." 8.300172571196522752044012769513722768714e-274" cr
s" 2.55e1" s>float erfc fe. ." 8.801662690727950571267149831749167485576e-285" cr
s" 2.60e1" s>float erfc fe. ." 5.663192408856142846475727896926092580329e-296" cr
s" 2.65e1" s>float erfc fe. ." 2.210907664263734275929239022915826039075e-307" cr
s" 2.70e1" s>float erfc fe. ." 5.237048923789255685016067682849547090934e-319" cr
s" 2.75e1" s>float erfc fe. ." 7.526685450446576390019421308136851786684e-331" cr
s" 2.80e1" s>float erfc fe. ." 6.563215840328784152380910481606274774134e-343" cr
s" 2.85e1" s>float erfc fe. ." 3.472324842773765004803444205414833803922e-355" cr
s" 2.90e1" s>float erfc fe. ." 1.114576716822273502962178302814958361364e-367" cr
s" 2.95e1" s>float erfc fe. ." 2.170606033898513863258927438981864795715e-380" cr
s" 3.00e1" s>float erfc fe. ." 2.564656203756111600033397277501447146549e-393" cr
